// import { getStorage } from '../../untils/storage'
Component({
  behaviors: [],
  properties: {},
  data: {
    token: '',
  },
  lifetimes: {
    created() {},
    attached() {
      const token = wx.getStorageSync('token')
      this.setData({
        token,
      })
      if (!token) {
        console.log('yseyseyyse')
        wx.utils.toast('请先登录！')
        wx.redirectTo({
          url: `/pages/login/index?redirectURL=${getCurrentPages()[0].route}`,
        })
      }
    },
    moved() {},
    detached() {},
  },
  methods: {},
})
